<html>
	<head>
		<title>michaelstoddart.com</title>
	    <link rel="stylesheet" type="text/css" href="http://www.michaelstoddart.com/styles/style.css" />
	</head>
	<body>

<?php 


$phonedefault = "447817759102";

reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) 
{
	if($key=="phone")
	{
		// this is to send a message

		reset ($HTTP_POST_VARS);
		while (list ($key, $val) = each ($HTTP_POST_VARS)) 
		{
			if($key=="phone")
			{
				$phone=$val;
			}
			if($key=="message")
			{
				$address=$val;
			}
		}


		$address="+".$phone."@icqsms.com";
//		print($address);
		email("michael",$address,"SMS Message",$message);
		email("michael","michael@michaelstoddart.com",$address." SMS Message",$message);
	}
}

?>




		<table align="center" width="70%">
			<tr><td>
				<h1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;michaelstoddart.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h1>
				<center>
					<img src="images/michaels.jpg">
					<h2>Michael Stoddart</h2>
					<hr>
					<h3>Send a text message</h3>
					<form method="post" action="sendoddmessage.php">
						<p><b>Phone:&nbsp;&nbsp;&nbsp;</b><input type="text" name="phone" size = "60" value="<?php print $phonedefault; ?>">
						<p><textarea name="message" rows="5" cols="80"></textarea>
						<p><input type="SUBMIT" value="Send">
					</form>
				</center>
			</td></tr>
		</table>
	</body>
</html>